using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using Rotempco.Core.Logic;

namespace Rotempco.Core.Web.Logic
{
    public class UrlEncodingLogic
    {
        public static string Encode(string input)
        {
            if (string.IsNullOrWhiteSpace(input))
                return string.Empty;

            return HttpUtility.UrlEncode(EncodingLogic.Base64Encode(input));
        }

        public static string Decode(string urlString)
        {
            if (string.IsNullOrWhiteSpace(urlString))
                return string.Empty;

            return EncodingLogic.Base64Decode(HttpUtility.UrlDecode(urlString));
        }

    }
}
